perm filename FMUNGE.REF[UP,DOC]3 blob
sn#291346 filedate 1977-07-01 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00009 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 FMUNGE is a hack for playing with fonts. It's primary purpose is
C00003 00003 Reading and writing fonts:
C00006 00004 Font tables and memory:
C00008 00005 Other miscellaneous commands:
C00010 00006 The format of star/dot files:
C00012 00007 W:23,0 A sample star/dot glyph (W from NGR25)
C00013 00008 The rest of the BNF:
C00016 00009 Caveat:
C00017 ENDMK
C⊗;
FMUNGE is a hack for playing with fonts. It's primary purpose is
to put characters into a text file where they can be edited with the
editor, ETV. It can also perform, as we will describe, miscellaneous
other transformations on your fonts.
The program, when started, begins by displaying a short list of
the available commands. A star prompt requests a command.
Reading and writing fonts:
The first class of commands (Get and Put) are used for reading
and writing a font (.FNT file) from memory. The syntax and semantics are:
G{<table number>}<fontname> Read (get) the requested font into table
<table number>.
P{<table number>}<fontname> Write (put) the font in table <table number>
onto the file <fontname>.
I{<table number>}<fontname> Read (input) the requested characters from
font file <fontname> into table <table number>.
Unlike the G command, I doesn't erase the
previous characters already in that table.
To transfer between the internal font format of FMUNGE, and editable
form, (henceforth "Star/Dot" format) the Read and Write commands are used:
R{table number>}<filename> Read the requested characters from the star/dot
file, into the font table. The file must be
a valid ETV format file.
W{table number>}<filename> Write the requested characters from font <table
number> onto the file <filename> in star/dot format.
The file thus created is ready for ETV (complete
with directory page).
T{table number>} Type the requested characters from font <table
number> on your terminal in star/dot format.
The I, R, and W commands request a character set. That is, they will prompt
you for the which of the characters are to be read or written. A null
line (just a <return>) implies all characters in that file.
The R and W commands type the nameof each character as it begins to process it.
These commands (and the T command) may be interupted by typing
<escape>I.
Font tables and memory:
FMUNGE believes in the existence of three font tables, null, ',
and " (0, 1 & 2). Thus, the command:
G'FIX25<cr>
reads FIX25.FNT[XGP,SYS] into table 1 (unless you have a FIX25.FNT on your
alias area.)
Other miscellaneous commands:
A<charname>←<charname> Assignment command. For instance,
Ak'←W"
takes and makes the glyph of k in table one the same
as the glyph of W from table 2.
F{<table number>} Change some of the font characteristics of that
font (font height, message, height above baseline.)
D{<table number>} Delete that font.
C Character edit mode. Permits you to change
several of the characteristics of
glyphs. Currently, the options are
D Delete this character.
K Set the left Kern of this character.
W Set this character's width.
To exit either loop, give a null reply.
B Call BAIL (if your version of FMUNGE has bail
loaded.) If you know what you're doing, there
are useful things you can do from inside BAIL.
S Save (or restore) the world. The command
S→<filename>
places on <filename> sufficient
information so that the command
S←<filename>
will restore computation to the state of the world
when the save command was issued.
H, ? Redisplay the help info.
E Exit back to the monitor.
Fmunge keeps track of its users (so that I can find out if anybody ever
uses the damn thing).
The format of star/dot files:
The file must be an ETV format file. FMUNGE uses the directory
to find the characters in the file.
Each character has a page to itself. The first line of the page
has the form:
<char>:<character width>,<left kern> <comment>
You can then skip some blank lines before the glyph definition.
The rest of the page defines the character. The first non-blank line
determines the raster width of the character. Periods, spaces are interpreted
as "undark" points; tabs are converted to a SINGLE space,
and all other printing characters are "dark" points. Lines after the first
need not extend to the full width of the character (and characters beyond that
width are ignored). The next page of this file is a sample star/dot glyph.
W:23,0 A sample star/dot glyph (W from NGR25)
.......................
**.......***.......**..
**.......***.......**..
**.......***.......**..
**.......***.......**..
***.....*****.....***..
***.....**.**.....***..
.**.....**.**.....**...
.**.....**.**.....**...
.***...***.***...***...
.***...***.***...***...
..**...**...**...**....
..**...**...**...**....
..***.***...***.***....
..***.***...***.***....
...**.**.....**.**.....
...**.**.....**.**.....
...*****.....*****.....
....***.......***......
....***.......***......
.......................
The rest of the BNF:
Items in braces are optional. Items in brackets are descriiptive.
* indicates 0 or more repetitions of that item. Some spaces are ignored
on input; <return>, <altmode> and <formfeed> are delimiters.
<table number> ::= ' | " [An absent table number indicates table 0.]
<fontname> ::= [Any legal SAIL file name. Default extension = ".FNT".
If the operation is a read operation, then the font
will also be sought on [XGP,SYS]. FMUNGE will not
write on [XGP,SYS] unless you explicitly request it
(or are aliased to [XGP,SYS]). ]
<filename> ::= [Any legal file name. Default extension for star/dot
files is ".CHR".]
<charlist> ::= <char>* [A null <charlist> indicates every character.]
<charname> ::= <char>{<table number>}
<char> ::= [most of the characters on the keyboard] | #<ascii number>
<altmode> ::= [the altmode key]
<character width>::= [a decimal number indicating the Logical width of this
character.]
<left kern> ::= [a decimal number indicating the left kern of this character.]
A <return> as reply to a file name request aborts the request. An altmode
in response to a character list request is likewise an abort. If you fail
to supple some information, you will often be prompted for it.
Caveat:
There are bound to be some more bugs in this program. Complain if
you find any. Use at your own risk. As I stated originally, it's a hack.
I wrote it to do something for me; if it's useful for you, fine.
There is lots more that could be added to this program. I might eventually
get around to it. I might not. If there's something you especially want, I
might get around to it sooner.
Bob Filman